<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790"> 
    <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{
			return false;
		}
	}
	//删除图组图片
	function mdel_img(path){
		$('#img_list div img').each(function(index, element) {
			$.post("{:U('delImgBypath')}",{'path':path},function(data){
				if(data=='OK'){
					
					$('#img_list div').each(function(index, element) {
                        if($(this).attr('url')==path){
							$(this).remove();
						}
                    });
					
					$('#picmsg input').each(function(index, element) {
                        if($(this).val()==path){
							$(this).remove();
						}
                    });
				}
			});
		});
	}
  </script>
    <h1><a href="{:U('index')}">返回列表</a></h1>
    <form class="checkoutform" action="{:U('insert')}" method="post">
    <table class="table table-bordered" border="0" cellpadding="0" cellspacing="0" width="100%">
    	<tr>
        	<td>标题</td>
            <td><input name="title" type="text" value="" size="70" maxlength="70"></td>
        </tr>
        <tr>
        	<td>详细</td>
            <td><html:editor id="editor" name="content" type="UEDIT" style="height:200px; width:600px;">{$info.content}</html:editor></td>
        </tr>
    </table>
      <table class="table table-bordered" border="0" cellpadding="0" cellspacing="0" width="100%">
        <tbody>
          <tr>
           <input type="hidden" name="id[]" value="1"><input type="hidden" name="praisefeild[]" value="first">
            <td><input type="text" name="praisename[]" value="一等奖"></td>
            <td><input type="text" name="min[]" value="1"></td>
            <td><input type="text" name="max[]" value="29"></td>
            <td><input type="text" name="praisecontent[]" value="iphone5s土豪金一部"></td>
            <td><input type="text" name="praisenumber[]" value="-1"></td>
            <td><input type="text" name="chance[]" value="1"></td>
          </tr>
          <tr>
            <input type="hidden" name="id[]" value="2"><input type="hidden" name="praisefeild[]" value="second">
            <td><input type="text" name="praisename[]" value="二等奖"></td>
            <td><input type="text" name="min[]" value="302"></td>
            <td><input type="text" name="max[]" value="328"></td>
            <td><input type="text" name="praisecontent[]" value="ipadmini"></td>
            <td><input type="text" name="praisenumber[]" value="-1"></td>
            <td><input type="text" name="chance[]" value="2"></td>
          </tr>
          <tr>
           <input type="hidden" name="id[]" value="3"><input type="hidden" name="praisefeild[]" value="Third">
            <td><input type="text" name="praisename[]" value="三等奖"></td>
            <td><input type="text" name="min[]" value="242"></td>
            <td><input type="text" name="max[]" value="268"></td>
            <td><input type="text" name="praisecontent[]" value="现金500"></td>
            <td><input type="text" name="praisenumber[]" value="-1"></td>
            <td><input type="text" name="chance[]" value="5"></td>
          </tr>
          <tr>
            <input type="hidden" name="id[]" value="4"><input type="hidden" name="praisefeild[]" value="Fourth">
            <td><input type="text" name="praisename[]" value="四等奖"></td>
            <td><input type="text" name="min[]" value="182"></td>
            <td><input type="text" name="max[]" value="208"></td>
            <td><input type="text" name="praisecontent[]" value="现金300"></td>
            <td><input type="text" name="praisenumber[]" value="-1"></td>
            <td><input type="text" name="chance[]" value="7"></td>
          </tr>
          <tr>
            <input type="hidden" name="id[]" value="5">
           <input type="hidden" name="praisefeild[]" value="Fifth">
            <td><input type="text" name="praisename[]" value="五等奖"></td>
            <td><input type="text" name="min[]" value="122"></td>
            <td><input type="text" name="max[]" value="148"></td>
            <td><input type="text" name="praisecontent[]" value="现金200"></td>
            <td><input type="text" name="praisenumber[]" value="-1"></td>
            <td><input type="text" name="chance[]" value="10"></td>
          </tr>
          <tr>
            <input type="hidden" name="id[]" value="6"><input type="hidden" name="praisefeild[]" value="Sixth">
            <td><input type="text" name="praisename[]" value="六等奖"></td>
            <td><input type="text" name="min[]" value="62"></td>
            <td><input type="text" name="max[]" value="88"></td>
            <td><input type="text" name="praisecontent[]" value="现金100"></td>
            <td><input type="text" name="praisenumber[]" value="-1"></td>
            <td><input type="text" name="chance[]" value="25"></td>
          </tr>
          <tr>
            <input type="hidden" name="id[]" value="7"><input type="hidden" name="praisefeild[]" value="Seventh">
            <td><input type="text" name="praisename[]" value="七等奖"></td>
            <td><input type="text" name="min[]" value="32,92,152,212,272,332"></td>
            <td><input type="text" name="max[]" value="58,118,178,238,298,358"></td>
            <td><input type="text" name="praisecontent[]" value="小熊宝宝一个"></td>
            <td><input type="text" name="praisenumber[]" value="-1"></td>
            <td><input type="text" name="chance[]" value="50"></td>
          </tr><tr>
            <td colspan="6" align="center"><button class="mybutton" type="submit">提交</button></td>
            </tr>
        </tbody>
      </table>
    </form>
  </div>
  <div class="clear"></div>
</div>
</body></html>